MCQ Answer

<p>What will be the output of the following expression ?</p><pre>print (7//2)<br>print (-7//2)</pre>

What will be the output of the following expression ?

print (7//2)
print (-7//2)


निम्नलिखित कोड का आउटपुट क्या होगा ?

print (7//2)
print (-7//2)
Topic : Operators Expressions and Python Statements

A. 3 -3

B. 4 -4

C. 3 -4

D. 3 3




Correct Answer is :

C. 3 -4



Explanation

// operator known as floor division which return the floor value of division 

7//2 = floor(7/2) => floor(3.5) =>3

-7//2= floor(-7/2) => floor(-3.5) => -4

so the correct answer is: 3 -4











CCC Online Test 2021 CCC Practice Test Hindi Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Naukari Notification Best Website and Software Company in Allahabad Sarkari Exam Quiz